code for ternary search

welcome to shbcf.ru